package com.qf.service.api;

import com.qf.service.Book;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther: Song
 * @Date: 2022-03-18 14:48
 */

public interface IBookController {

    @GetMapping("/book/")
    @ResponseBody
    Book getBookById(@RequestParam("id") Integer id);

    @DeleteMapping("/book/{id}")
    @ResponseBody
    void deleteBookById(@PathVariable("id") Integer id);

    @PostMapping("/book/")
    @ResponseBody
    Book addBook(@RequestBody Book book);

    @PutMapping("/book/")
    @ResponseBody
    void updateBook(@RequestBody Book book);
}
